package dataStructure;

/**
 * @author WuYongheng
 * @date 2022/3/27
 * @description 单链表
 */
public class Node {
    Object data;//表示当前节点存放数据的部分
    Node next;//指向下一个的节点

    public Node() {
    }

    public Node(Object data) {
        this.data = data;
    }

    public Node(Object data, Node next) {
        this.data = data;
        this.next = next;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Node getNext() {
        return next;
    }

    public void setNext(Node next) {
        this.next = next;
    }
}
